<?php
///**
//// * 创建数据库连接
//// */
//// 创建连接
//$conn = new mysqli("localhost", "root", "123456");
//// 检测连接
//if ($conn->connect_error)
//{
//    die("连接失败: " . $conn->connect_error);}
//// 创建数据库
//$sql = "CREATE DATABASE zb";
//if ($conn->query($sql) === TRUE)
//{
//    echo "数据库创建成功";
//} else {
//    echo "Error creating database: " . $conn->error;
//}
//$conn->close();
//?><!--//建库-->

<?php
///**用户表
//// *
//// */
//$conn = new mysqli("localhost", "root", "123456","zb");
//// 检测连接
//if ($conn->connect_error)
//{
//    die("连接失败: " . $conn->connect_error);
//}
//// 使用 sql 创建数据表
//$sql = "CREATE TABLE login (
//   id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
//   username VARCHAR(30) NOT NULL,
//   password VARCHAR(30) NOT NULL,
//   confirm VARCHAR(30) NOT NULL,
//   department VARCHAR(30) ,
//   tel VARCHAR(30) ,
//   email VARCHAR(30),
//   time TIMESTAMP
//   )ENGINE=InnoDB DEFAULT CHARSET=utf8 ";
//if ($conn->query($sql) === TRUE)
//{
//    echo "Table user_table created successfully";
//} else {
//    echo "创建数据表错误: " . $conn->error;
//}
//$conn->close();
//?><!--//建表user_table-->

<?php
/**用户表
// *
// */
$conn = new mysqli("localhost", "root", "123456","zb");
// 检测连接
if ($conn->connect_error)
{
    die("连接失败: " . $conn->connect_error);
}
// 使用 sql 创建数据表
$sql = "CREATE TABLE user (
   id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY, 
   week VARCHAR (30) NOT NULL ,
   username VARCHAR(30) NOT NULL,
   comment text,
   time TIMESTAMP 
   )ENGINE=InnoDB DEFAULT CHARSET=utf8 ";
if ($conn->query($sql) === TRUE)
{
    echo "Table user_table created successfully";
} else {
    echo "创建数据表错误: " . $conn->error;
}
$conn->close();
?>//建表user_table

<?php
///**数据表
// *
// */
//$conn = new mysqli("localhost", "root", "123456","zb");
//// 检测连接
//if ($conn->connect_error)
//{
//    die("连接失败: " . $conn->connect_error);
//}
//// 使用 sql 创建数据表
//$sql = "CREATE TABLE main_table (
//   id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
//   usertext_id INT(10) NOT NULL,
//   user_id INT(10) NOT NULL,
//   week VARCHAR (30) NOT NULL ,
//   object text,
//   text text,
//   note text,
//   status text,
//   time TIMESTAMP
//   )ENGINE=InnoDB DEFAULT CHARSET=utf8 ";
//if ($conn->query($sql) === TRUE)
//{
//    echo "Table text_table created successfully";
//} else {
//    echo "创建数据表错误: " . $conn->error;
//}
//$conn->close();
//?><!--//建表text_table主要工作-->
<!---->
<?php
///**数据表
// *
// */
//$conn = new mysqli("localhost", "root", "123456","zb");
//// 检测连接
//if ($conn->connect_error)
//{
//    die("连接失败: " . $conn->connect_error);
//}
//// 使用 sql 创建数据表
//$sql = "CREATE TABLE noFinish_table (
//   id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
//   usertext_id INT(10) NOT NULL,
//   user_id INT(10) NOT NULL,
//   week VARCHAR (30) NOT NULL ,
//   object text,
//   text text,
//   note text,
//   status text,
//   time TIMESTAMP
//   )ENGINE=InnoDB DEFAULT CHARSET=utf8 ";
//if ($conn->query($sql) === TRUE)
//{
//    echo "Table text_table created successfully";
//} else {
//    echo "创建数据表错误: " . $conn->error;
//}
//$conn->close();
//?><!--//建表text_table未完成-->
<!---->
<?php
///**数据表
// *
// */
//$conn = new mysqli("localhost", "root", "123456","zb");
//// 检测连接
//if ($conn->connect_error)
//{
//    die("连接失败: " . $conn->connect_error);
//}
//// 使用 sql 创建数据表
//$sql = "CREATE TABLE next_week(
//   id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
//   usertext_id INT(10) NOT NULL,
//   user_id INT(10) NOT NULL,
//   week VARCHAR (30) NOT NULL ,
//   object text,
//   text text,
//   predicted_time text,
//   note text,
//   time TIMESTAMP
//   )ENGINE=InnoDB DEFAULT CHARSET=utf8 ";
//if ($conn->query($sql) === TRUE)
//{
//    echo "Table text_table created successfully";
//} else {
//    echo "创建数据表错误: " . $conn->error;
//}
//$conn->close();
//?><!--//建表text_table下周工作计划-->